﻿using Mysqlx.Crud;
using Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using xiaoxiong.KYJDAL.Models;

namespace xiaoxiong.KYJDAL.Services
{
    public class SysAdminService : Repository<SysAdmin>
    {
        public SysAdmin Login(SysAdmin sysAdmin)
        {
            var res = base.Context.Queryable<SysAdmin>()
                .Where(e => e.LoginName == sysAdmin.LoginName && e.LoginPwd == sysAdmin.LoginPwd)
                .Single();
            if (res != null)
            {
                return res;
            }
            return null;
        }
    }
}
